﻿using System.ServiceModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using ZY.EntityFrameWork.Core.Model.Dto;

namespace ZY.EntityFrameWork.WcfSvcLib.Interface
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IArvOPService”。
    [ServiceContract]
    public interface IWcfArvOpService
    {
        #region 位置信息
        /// <summary>
        /// 判断位置信息是否已经存在
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        //bool CheckLocationExists(ArvLocationDto dto);

        [OperationContract]
        int AddNewLocation(ArvLocationDto dto);

        [OperationContract]
        int AddNewLocations(List<ArvLocationDto> dtos);

        #endregion

        #region 入库相关

        [OperationContract]
        /// <summary>
        /// 查找在库档案
        /// </summary>
        /// <returns></returns>
        List<ArchiveInfoDto> GetArvInLib();

        [OperationContract(Name = "SingleInputToLib")]
        /// <summary>
        /// 档案入库
        /// </summary>
        /// <param name="arv"></param>
        int InputToLib(ArchiveInfoDto arv);

        [OperationContract(Name = "MultiInputToLib")]
        /// <summary>
        /// 多条档案同时入库
        /// </summary>
        /// <param name="arvs"></param>
        /// <returns></returns>
        int InputToLib(List<ArchiveInfoDto> arvs);

        [OperationContract(Name = "SingleInputToCab")]
        /// <summary>
        /// 单个档案放入柜中(后期看情况第二个参数改成档案盒编号)
        /// </summary>
        /// <param name="dto"></param>
        /// <param name="locDto"></param>
        /// <returns></returns>
        int InputToCab(ArchiveInfoDto dto, ArvLocationDto locDto);

        [OperationContract(Name = "MultiInputToCab")]
        /// <summary>
        /// 多个档案放入同一位置
        /// </summary>
        /// <param name="arvs"></param>
        int InputToCab(List<ArchiveInfoDto> arvs, ArvLocationDto locDto);

        #endregion

        #region 借阅相关
        [OperationContract]
        /// <summary>
        /// 查找在柜档案
        /// </summary>
        /// <returns></returns>
        List<ArchiveInfoDto> GetArvInCab();

        [OperationContract]
        int ArvLend(LendInfoDto lendInfo, List<ArchiveInfoDto> arvInfos);

        #endregion

        #region 归还相关
        [OperationContract]
        /// <summary>
        /// 查找被借阅的档案
        /// </summary>
        /// <returns></returns>
        List<ArchiveInfoDto> GetArvLended();

        [OperationContract]
        int ArvReturn(ReturnInfoDto returnInfo, List<ArchiveInfoDto> arvInfos);

        #endregion

        #region 出柜相关

        [OperationContract]
        int ArvOutput(OutCabInfoDto dto, List<ArchiveInfoDto> arvInfos);

        #endregion
    }
}
